import React, { useEffect, useState } from 'react'
import Arrstatus, { stateType } from '@/store/Arrstatus/state'
import { useDispatch, useSelector } from 'react-redux'
import { Button } from 'antd'

const About: React.FC = () => {
  const dispatch = useDispatch()
  const state: stateType = useSelector((state: RootState) => state.Arrstatus_reducer)
  const changeArr = (s:number) => {
    dispatch({type:Arrstatus.actionsName.arr_push})
    dispatch({type:Arrstatus.actionsName.arr_push1,s:s})
    dispatch({type:Arrstatus.actionsName.arr_push2,s:s})
  }
  return (
    <>
      <div>{state.arr1 && state.arr1.map((item, index) => {
        return <div key={index}>{item}</div>
      })}</div>
      <Button onClick={()=>{changeArr(1)}}>123</Button>
    </>

  )
}

export default About